// =================================================================================================
//
//	CopyEngine Framework
//	Copyright 2012 Eran. All Rights Reserved.
//
//	This program is free software. You can redistribute and/or modify it
//	in accordance with the terms of the accompanying license agreement.
//
// =================================================================================================

/**
 * Created by eran on 15-1-9.
 */
package gui.utils.blockEditor.ext
{
    import flash.text.TextField;

    public class ExtMonsterEditPanel extends ExtEditPanelBasic
    {
        private var mBloodNumTF:TextField;
        private var mAttackNumTF:TextField;
        private var mDefendNumTF:TextField;
        private var mExpNumTF:TextField;

        public function ExtMonsterEditPanel()
        {
        }

        //=================================//
        //====== Override Function ========//
        //=================================//

        override protected function doInitialize():void
        {
            mBloodNumTF = mPanelMc["bloodNumTF"];
            mAttackNumTF = mPanelMc["attackNumTF"];
            mDefendNumTF = mPanelMc["defendNumTF"];
            mExpNumTF = mPanelMc["expNumTF"];
        }

        override public function isShowPanel(_blockTypeStr:String):Boolean
        {
            return  _blockTypeStr == "Monster" || _blockTypeStr == "LevelBoss";
        }

        override protected function doSaveDataBackToVo():void
        {
            mTargetVo.maxBloodNum = int(mBloodNumTF.text);
            mTargetVo.attackNum = int(mAttackNumTF.text);
            mTargetVo.defendNum = int(mDefendNumTF.text);
            mTargetVo.expNum = int(mExpNumTF.text);

        }
    }
}
